<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 127 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts127p0{position:absolute;left:106px;top:97px;}
 .ts127p1{position:absolute;left:352px;top:97px;}
 .ts127p3{position:absolute;left:665px;top:97px;}
 .ts127p7{position:absolute;left:106px;top:113px;}
 .ts127p8{position:absolute;left:706px;top:1026px;}
 .ts127p9{position:absolute;left:331px;top:1044px;}
 .ts127p13{position:absolute;left:106px;top:147px;}
 .ts127p15{position:absolute;left:106px;top:165px;}
 .ts127p17{position:absolute;left:106px;top:183px;}
 .ts127p19{position:absolute;left:106px;top:201px;}
 .ts127p21{position:absolute;left:106px;top:220px;}
 .ts127p24{position:absolute;left:106px;top:237px;}
 .ts127p27{position:absolute;left:106px;top:256px;}
 .ts127p29{position:absolute;left:114px;top:256px;}
 .ts127p31{position:absolute;left:123px;top:256px;}
 .ts127p32{position:absolute;left:106px;top:274px;}
 .ts127p33{position:absolute;left:106px;top:293px;}
 .ts127p34{position:absolute;left:106px;top:311px;}
 .ts127p38{position:absolute;left:106px;top:330px;}
 .ts127p39{position:absolute;left:106px;top:348px;}
 .ts127p40{position:absolute;left:106px;top:366px;}
 .ts127p42{position:absolute;left:106px;top:385px;}
 .ts127p43{position:absolute;left:106px;top:403px;}
 .ts127p44{position:absolute;left:106px;top:422px;}
 .ts127p46{position:absolute;left:106px;top:440px;}
 .ts127p47{position:absolute;left:106px;top:458px;}
 .ts127p48{position:absolute;left:106px;top:477px;}
 .ts127p50{position:absolute;left:106px;top:495px;}
 .ts127p52{position:absolute;left:106px;top:514px;}
 .ts127p53{position:absolute;left:106px;top:533px;}
 .ts127p54{position:absolute;left:106px;top:551px;}
 .ts127p56{position:absolute;left:106px;top:570px;}
 .ts127p58{position:absolute;left:106px;top:588px;}
 .ts127p60{position:absolute;left:106px;top:606px;}
 .ts127p62{position:absolute;left:126px;top:605px;}
 .ts127p63{position:absolute;left:106px;top:624px;}
 .ts127p65{position:absolute;left:106px;top:642px;}
 .ts127p68{position:absolute;left:106px;top:660px;}
 .ts127p70{position:absolute;left:106px;top:678px;}
 .ts127p72{position:absolute;left:106px;top:696px;}
 .ts127p74{position:absolute;left:106px;top:715px;}
 .ts127p76{position:absolute;left:106px;top:733px;}
 .ts127p78{position:absolute;left:126px;top:732px;}
 .ts127p79{position:absolute;left:106px;top:751px;}
 .ts127p81{position:absolute;left:106px;top:769px;}
 .ts127p82{position:absolute;left:106px;top:788px;}
 .ts127p84{position:absolute;left:106px;top:806px;}
 .ts127p85{position:absolute;left:106px;top:824px;}
 .ts127p86{position:absolute;left:106px;top:843px;}
 .ts127p88{position:absolute;left:106px;top:861px;}
 .ts127p90{position:absolute;left:106px;top:880px;}
 .ts127p91{position:absolute;left:379px;top:897px;}
 .ts127p93{position:absolute;left:313px;top:915px;}
 .ts127p95{position:absolute;left:173px;top:935px;}
 .ts127p97{position:absolute;left:358px;top:935px;}
 .ts127p98{position:absolute;left:358px;top:953px;}
 .ts127p99{position:absolute;left:358px;top:972px;}

 /* Font Styles */
 .ft0p127{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p127{font-weight:normal;}
 .ft2p127{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p127{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p127{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p127{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft6p127{font-family:arial,sans-serif;}
 .ft7p127{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft8p127{font-style:normal;font-weight:bold;font-size:16px;font-family:helvetica,arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground127{position:absolute;left:97px;top:145px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index126.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;127 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index128.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground127><img src="./background127.png" width="641" height="910" border="0" alt=""></div>
<div class=ts127p0><span class="ft0p127"> </span></div>
<div class=ts127p1><span class="ft0p127">Gravitybox Schedule Primer<span class="ft1p127"> </span></span></div>
<div class=ts127p3><span class="ft0p127">Page 125&nbsp; </span></div>
<div class=ts127p7><span class="ft2p127"> </span></div>
<div class=ts127p8><span class="ft3p127"> </span></div>
<div class=ts127p9><span class="ft4p127">1998&#45;2004 Gravitybox Software LLC<span class="ft3p127"> </span></span></div>
<div class=ts127p13><span class="ft5p127">Set oTask = TaskList1.Tasks.Add <span class="ft6p127"> </span></span></div>
<div class=ts127p15><span class="ft5p127">oTask.TaskItems(1).Text = &#34;My Subject&#34; <span class="ft6p127"> </span></span></div>
<div class=ts127p17><span class="ft5p127">oTask.TaskItems(2).Text = &#34;12/31/2002&#34; <span class="ft6p127"> </span></span></div>
<div class=ts127p19><span class="ft5p127">oTask.TaskItems(3).Text = &#34;11:00 AM&#34; <span class="ft6p127"> </span></span></div>
<div class=ts127p21><span class="ft5p127">oTask.TaskItems(4).Text = &#34;60&#34; <span class="ft6p127"> </span></span></div>
<div class=ts127p24><span class="ft5p127">Set oTask = Nothing<span class="ft6p127"> </span><span class="ft6p127"> </span></span></div>
<div class=ts127p27><span class="ft7p127">&nbsp; </span></div>
<div class=ts127p29><span class="ft7p127">&nbsp; </span></div>
<div class=ts127p31><span class="ft7p127"> </span></div>
<div class=ts127p32><span class="ft7p127">As you can see, we did not add any TaskItems, we just edited the existing ones. In fact </span></div>
<div class=ts127p33><span class="ft7p127">you cannot add any of these objects since the collection has not add method. The </span></div>
<div class=ts127p34><span class="ft7p127">control is also drag&#45;drop enabled and may accept appointments from the Schedule </span></div>
<div class=ts127p38><span class="ft7p127">control. This process if not automatic. When a ScheduleItem is dropped on the TaskList, </span></div>
<div class=ts127p39><span class="ft7p127">the TaskList&#146;s &#148;DragDropScheduleItem&#148; event is raised. Code may be placed here that </span></div>
<div class=ts127p40><span class="ft7p127">will add the dropped item to the TaskList. This is necessary because the TaskList does </span></div>
<div class=ts127p42><span class="ft7p127">not have any predefined columns. The developer adds all columns and there is no </span></div>
<div class=ts127p43><span class="ft7p127">guarantee that there will be a Date, Time, or Room column present when the </span></div>
<div class=ts127p44><span class="ft7p127">appointment is dropped. In addition the dropped appointment does not know which of its </span></div>
<div class=ts127p46><span class="ft7p127">properties map to which column. For instance in Germany, the ScheduleItem&#146;s &#148;Room&#148; </span></div>
<div class=ts127p47><span class="ft7p127">property will not map to a Room column since the developer will not use the English </span></div>
<div class=ts127p48><span class="ft7p127">word &#148;Room&#148;. For these reasons the developer must add code to map the </span></div>
<div class=ts127p50><span class="ft7p127">appointment&#146;s properties to the appropriate columns.&nbsp; </span></div>
<div class=ts127p52><span class="ft7p127"> </span></div>
<div class=ts127p53><span class="ft5p127">Private Sub TaskList1_DragDropScheduleItem(ByVal ScheduleItem </span></div>
<div class=ts127p54><span class="ft5p127">As Scheduler.CScheduleEl) <span class="ft6p127"> </span></span></div>
<div class=ts127p56><span class="ft5p127">&nbsp; <span class="ft6p127"> </span></span></div>
<div class=ts127p58><span class="ft5p127">Dim oTask As CTaskEl <span class="ft6p127"> </span></span></div>
<div class=ts127p60><span class="ft5p127">&nbsp; </span></div>
<div class=ts127p62><span class="ft7p127"> </span></div>
<div class=ts127p63><span class="ft5p127">&nbsp; Set oTask = TaskList1.Tasks.Add <span class="ft6p127"> </span></span></div>
<div class=ts127p65><span class="ft5p127">&nbsp; oTask.TaskItems(1).Text = ScheduleItem.Subject <span class="ft6p127"> </span></span></div>
<div class=ts127p68><span class="ft5p127">&nbsp; oTask.TaskItems(2).Text = ScheduleItem.StartDate <span class="ft6p127"> </span></span></div>
<div class=ts127p70><span class="ft5p127">&nbsp; oTask.TaskItems(3).Text = ScheduleItem.StartTime <span class="ft6p127"> </span></span></div>
<div class=ts127p72><span class="ft5p127">&nbsp; oTask.TaskItems(4).Text = ScheduleItem.Length <span class="ft6p127"> </span></span></div>
<div class=ts127p74><span class="ft5p127">&nbsp; Set oTask = Nothing <span class="ft6p127"> </span></span></div>
<div class=ts127p76><span class="ft5p127">&nbsp; </span></div>
<div class=ts127p78><span class="ft7p127"> </span></div>
<div class=ts127p79><span class="ft5p127">End Sub<span class="ft6p127"> </span></span></div>
<div class=ts127p81><span class="ft7p127"> </span></div>
<div class=ts127p82><span class="ft7p127">This code is executed when a ScheduleItem is dropped on a TaskList. This TaskList </span></div>
<div class=ts127p84><span class="ft7p127">has four columns that we added earlier. Therefore each Task will already have 4 </span></div>
<div class=ts127p85><span class="ft7p127">TaskItems present. The code maps column 1 to the Subject property, column 2 to </span></div>
<div class=ts127p86><span class="ft7p127">StartDate, column 3 to StartTime, and column 4 to the Length property. After this event, </span></div>
<div class=ts127p88><span class="ft7p127">the control will append a Task with the appointment&#146;s information. </span></div>
<div class=ts127p90><span class="ft7p127"> </span></div>
<div class=ts127p91><span class="ft8p127">Table 13.3 </span></div>
<div class=ts127p93><span class="ft8p127">TaskList Control Properties </span></div>
<div class=ts127p95><span class="ft7p127">AddText </span></div>
<div class=ts127p97><span class="ft7p127">The text that is displayed in the add portion of the </span></div>
<div class=ts127p98><span class="ft7p127">control when it does not have focus. This should be </span></div>
<div class=ts127p99><span class="ft7p127">an instruction on what is the defined area. </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
